package com.nongcai159.mall.lib_common.utils

import com.orhanobut.logger.Logger
import com.orhanobut.logger.Settings

/**
 * log工具类
 *
 *
 * Created by tanbiheng on 2018/11/23.
 */

object MLog {
    private val TAG = "LibMLog"

    fun init(): Settings {
        return Logger
                .init(TAG)            // 默认 PRETTYLOGGER
                .methodCount(2)      // 默认 2
        //.hideThreadInfo()   // 默认 show
        //.methodOffset(2);   // 默认 0
        //.logAdapter(new AndroidLogAdapter()); //默认 AndroidLogAdapter
    }

    fun d(message: String, vararg args: Any) {
        Logger.d(message, *args)
    }

    fun e(message: String, vararg args: Any) {
        Logger.e(message, *args)
    }

    fun i(message: String, vararg args: Any) {
        Logger.i(message, *args)
    }

    fun json(json: String) {
        Logger.json(json)
    }

    fun xml(xml: String) {
        Logger.xml(xml)
    }
}
